﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Betop.Lib.Common;

namespace Betop.Lib.Core.Attach
{
    public partial class ImageInfo
    {
        /// <summary>
        /// 原始图片存放绝对路径
        /// </summary>
        public String OriginImageAbsPath
        {
            get
            {
                if (string.IsNullOrEmpty(this.OriginImage))
                {
                    return this.OriginImage;
                }
                else
                {
                    return GlobalVar.WebAppPath + this.OriginImage;
                }
            }
        }
        /// <summary>
        /// 经小图片存绝对路径，可以用作缩略图
        /// </summary>
        public String SmallImageAbsPath
        {
            get
            {
                if (string.IsNullOrEmpty(this.SmallImage))
                {
                    return this.SmallImage;
                }
                else
                {
                    return GlobalVar.WebAppPath + this.SmallImage;
                }
            }
        }
        /// <summary>
        /// 经压缩的大图片存绝对路径，一般用于前台显示
        /// </summary>
        public String BigImageAbsPath
        {
            get
            {
                if (string.IsNullOrEmpty(this.BigImage))
                {
                    return this.BigImage;
                }
                else
                {
                    return GlobalVar.WebAppPath + this.BigImage;
                }
            }
        }
    }
}
